export const enum EStatus {
  NoStart,
  InProgress,
  Resolved,
  Ready,
  Closed,
}

export const enum EStatusTypeString {
  NoStart = 'no start',
  InProgress = 'in progress',
  Resolved = 'resolved',
  Ready = 'ready',
  Closed = 'closed',
}

const statusStringMappings = {
  [EStatus.NoStart]: EStatusTypeString.NoStart,
  [EStatus.InProgress]: EStatusTypeString.InProgress,
  [EStatus.Resolved]: EStatusTypeString.Resolved,
  [EStatus.Ready]: EStatusTypeString.Ready,
  [EStatus.Closed]: EStatusTypeString.Closed,
};
const statusEnumMappings = {
  [EStatusTypeString.NoStart]: EStatus.NoStart,
  [EStatusTypeString.InProgress]: EStatus.InProgress,
  [EStatusTypeString.Resolved]: EStatus.Resolved,
  [EStatusTypeString.Ready]: EStatus.Ready,
  [EStatusTypeString.Closed]: EStatus.Closed,
};

export const toStatusString = (status: EStatus) => statusStringMappings[status];
export const toStatusEnum = (status: string) =>
  statusEnumMappings[status as EStatusTypeString];
